package com.test.application.designPatterns.singleton.demo5;

/**
 * 描述: 懒汉式: 静态内部类方式
 * 作者: yanruizhi
 * 时间: 2024/9/18 17:42
 */
public class Singleton {
    private Singleton() {
    }

    private static class SingletonHolder {
        private static final Singleton INSTANCE = new Singleton();
    }

    public static Singleton getInstance() {
        return SingletonHolder.INSTANCE;
    }
}
